-
Notifications
You must be signed in to change notification settings - Fork 31
Enable containers to add CAs to the trust store on start up #2929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable containers to add CAs to the trust store on start up #2929
Conversation
8f37e40 to
c50c8cf
Compare
|
For testing, I've been using something like the following framework: Of special note is the Once you've got the containers up and running, you can try things like: |
c50c8cf to
d771559
Compare
'graphviz' is necessary for some of `go tool pprof`'s visualizations. 'psmisc' includes `killall`, which is useful for cleaning up after accidental mass-invocations of some command, such as the file transfer plugin.
d771559 to
615d429
Compare
jhiemstrawisc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look okay to me, and if the entrypoint updates help you I'm not opposed to them -- I'll note that I'm not sure the trick of adding /certs to anchor and updating the trust store helps most of the Pelican devs. I did a quick poll and we're all using the VSCode devcontainers extension, which doesn't go through the entrypoints defined here. At least in my case, I also rely on Pelican to generate a new CA on its first run whenever I need to restart my container, at which point it's too late to do something clever with entrypoints.
To quote Luke Skywalker, "Every word of what you just said was wrong." Obviously, not literally so, but… I am aware of no production service that is expected to create its own certificate or CA on startup (or restart), and Pelican's released container images use these entrypoints, so the notion that there's a developer out there that doesn't go through these entrypoints is… What are they actually testing? |
This PR makes two improvements to our container images.
The primary improvement is to
entrypoint.sh, which now scans/certsfor certificates (*.crtfiles) and adds them to the container's trust store. During development and testing, this should help minimize, if not eliminate, the need to resort toTLSSkipVerify: trueor similar, especially for those programs that might not be aware of Pelican's configuration (e.g.,curl).Note
There is hypothetically a backwards compatibility concern given that I chose to scan
/certsbased on where We™ currently seem to bind mount certificates into containers. That said, I would find it passing strange for a container to mount a certificate it doesn't trust but presumably expects the rest of the world to trust.The secondary improvements are to the container image build process (the Dockerfile), which are intended to facilitate repeated image builds by improving layer caching and not building unnecessary binaries.